﻿using System;
using System.ComponentModel;
using System.Xml.Serialization;
using DevExpress.Xpo;
using DevExpress.Xpo.Metadata;
using DevExpress.Xpo.Helpers;
using DevExpress.Data.Filtering;
using DevExpress.ExpressApp;
using DevExpress.Persistent.Base;
using DevExpress.Persistent.BaseImpl;
using DevExpress.Persistent.Validation;
namespace Top.Module.Domain
{
    [DefaultClassOptions]
    [Persistent("TopItemData")]
    public class ItemData : BaseObject
    {
        //begin
        public ItemData()
        {}
        public ItemData(Session session) : base(session)
        {}
        public override void AfterConstruction(){base.AfterConstruction();}

        private string _PicWideUrl;
        public string PicWideUrl
        {
            get
            {
                return _PicWideUrl;
            }
            set
            {
                SetPropertyValue("PicWideUrl", ref _PicWideUrl, value);
            }
        }
        private string _ItemId;
        public string ItemId
        {
            get
            {
                return _ItemId;
            }
            set
            {
                SetPropertyValue("ItemId", ref _ItemId, value);
            }
        }
        private string _LongName;
        public string LongName
        {
            get
            {
                return _LongName;
            }
            set
            {
                SetPropertyValue("LongName", ref _LongName, value);
            }
        }
        private string _ShortName;
        public string ShortName
        {
            get
            {
                return _ShortName;
            }
            set
            {
                SetPropertyValue("ShortName", ref _ShortName, value);
            }
        }
        private string _ItemUrl;
        public string ItemUrl
        {
            get
            {
                return _ItemUrl;
            }
            set
            {
                SetPropertyValue("ItemUrl", ref _ItemUrl, value);
            }
        }
        private long _ParentCategory;
        public long ParentCategory
        {
            get
            {
                return _ParentCategory;
            }
            set
            {
                SetPropertyValue("ParentCategory", ref _ParentCategory, value);
            }
        }
        private long _ChildCategory;
        public long ChildCategory
        {
            get
            {
                return _ChildCategory;
            }
            set
            {
                SetPropertyValue("ChildCategory", ref _ChildCategory, value);
            }
        }
        private string _ShopType;
        public string ShopType
        {
            get
            {
                return _ShopType;
            }
            set
            {
                SetPropertyValue("ShopType", ref _ShopType, value);
            }
        }
        private bool _PayPostage;
        public bool PayPostage
        {
            get
            {
                return _PayPostage;
            }
            set
            {
                SetPropertyValue("PayPostage", ref _PayPostage, value);
            }
        }
        private long _OriginalPrice;
        public long OriginalPrice
        {
            get
            {
                return _OriginalPrice;
            }
            set
            {
                SetPropertyValue("OriginalPrice", ref _OriginalPrice, value);
            }
        }
        private string _PicUrl;
        public string PicUrl
        {
            get
            {
                return _PicUrl;
            }
            set
            {
                SetPropertyValue("PicUrl", ref _PicUrl, value);
            }
        }
        private long _ActivityPrice;
        public long ActivityPrice
        {
            get
            {
                return _ActivityPrice;
            }
            set
            {
                SetPropertyValue("ActivityPrice", ref _ActivityPrice, value);
            }
        }
        private string _City;
        public string City
        {
            get
            {
                return _City;
            }
            set
            {
                SetPropertyValue("City", ref _City, value);
            }
        }
        private string _ItemDesc;
        [Size(SizeAttribute.Unlimited)]
        public string ItemDesc
        {
            get
            {
                return _ItemDesc;
            }
            set
            {
                SetPropertyValue("ItemDesc", ref _ItemDesc, value);
            }
        }
        private string _ItemStatus;
        public string ItemStatus
        {
            get
            {
                return _ItemStatus;
            }
            set
            {
                SetPropertyValue("ItemStatus", ref _ItemStatus, value);
            }
        }
        private string _ItemGuarantee;
        public string ItemGuarantee
        {
            get
            {
                return _ItemGuarantee;
            }
            set
            {
                SetPropertyValue("ItemGuarantee", ref _ItemGuarantee, value);
            }
        }
        private string _Discount;
        public string Discount
        {
            get
            {
                return _Discount;
            }
            set
            {
                SetPropertyValue("Discount", ref _Discount, value);
            }
        }
        private string _PlatformId;
        public string PlatformId
        {
            get
            {
                return _PlatformId;
            }
            set
            {
                SetPropertyValue("PlatformId", ref _PlatformId, value);
            }
        }
        private string _GroupId;
        public string GroupId
        {
            get
            {
                return _GroupId;
            }
            set
            {
                SetPropertyValue("GroupId", ref _GroupId, value);
            }
        }
        private string _SellerId;
        public string SellerId
        {
            get
            {
                return _SellerId;
            }
            set
            {
                SetPropertyValue("SellerId", ref _SellerId, value);
            }
        }
        private string _SellerNick;
        public string SellerNick
        {
            get
            {
                return _SellerNick;
            }
            set
            {
                SetPropertyValue("SellerNick", ref _SellerNick, value);
            }
        }
        private long _SellerCredit;
        public long SellerCredit
        {
            get
            {
                return _SellerCredit;
            }
            set
            {
                SetPropertyValue("SellerCredit", ref _SellerCredit, value);
            }
        }
        private string _CategoryId;
        public string CategoryId
        {
            get
            {
                return _CategoryId;
            }
            set
            {
                SetPropertyValue("CategoryId", ref _CategoryId, value);
            }
        }
        private long _SoldCount;
        public long SoldCount
        {
            get
            {
                return _SoldCount;
            }
            set
            {
                SetPropertyValue("SoldCount", ref _SoldCount, value);
            }
        }
        private string _PicUrlFromIc;
        public string PicUrlFromIc
        {
            get
            {
                return _PicUrlFromIc;
            }
            set
            {
                SetPropertyValue("PicUrlFromIc", ref _PicUrlFromIc, value);
            }
        }
        private bool _IsLock;
        public bool IsLock
        {
            get
            {
                return _IsLock;
            }
            set
            {
                SetPropertyValue("IsLock", ref _IsLock, value);
            }
        }
        private long _CurrentStock;
        public long CurrentStock
        {
            get
            {
                return _CurrentStock;
            }
            set
            {
                SetPropertyValue("CurrentStock", ref _CurrentStock, value);
            }
        }
        private bool _ExistHoldStock;
        public bool ExistHoldStock
        {
            get
            {
                return _ExistHoldStock;
            }
            set
            {
                SetPropertyValue("ExistHoldStock", ref _ExistHoldStock, value);
            }
        }
        private long _OnlineStartTime;
        public long OnlineStartTime
        {
            get
            {
                return _OnlineStartTime;
            }
            set
            {
                SetPropertyValue("OnlineStartTime", ref _OnlineStartTime, value);
            }
        }
        private long _OnlineEndTime;
        public long OnlineEndTime
        {
            get
            {
                return _OnlineEndTime;
            }
            set
            {
                SetPropertyValue("OnlineEndTime", ref _OnlineEndTime, value);
            }
        }
        [Association("ItemDataShopPositionList", typeof(ShopPositionData)), Aggregated]
        public XPCollection<ShopPositionData> ShopPositionList
        {
            get
            {
                return GetCollection<ShopPositionData>("ShopPositionList");
            }
        }
        private GroupData _GroupData;
        [Association("GroupDataItemList", typeof(GroupData))]
        public GroupData GroupData
        {
            get
            {
                return _GroupData;
            }
            set
            {
                SetPropertyValue("GroupData", ref _GroupData, value);
            }
        }
        //end

    }
}
